function reactionStructure = get_reaction_information(reaction)

    temporaryListOfPathways = [];
    temporaryListOfReactionPairs = [];
    reactionStructure= struct('ENTRY','***','NAME','***', ...
                'DEFINITION','***', 'EQUATION','***', 'URI','***', 'PATHWAY', ...
                temporaryListOfPathways, 'RPs', temporaryListOfReactionPairs);
    isFound=false;
    reactions=[];
    try
        reactions = evalin('base', 'reactions'); 
    catch err
        assignin('base', 'reactions', reactions);
    end

    for i=1:length(reactions)
        if strcmp(reactions(i).ENTRY,reaction) == 1
            reactionStructure = reactions(i);
            isFound=true;
        end
    end

    if ~isFound        
         try
            url_c=strcat('http://rest.kegg.jp/get/',reaction);
            reactionStructure.URI=url_c;
            [keggData,status] = urlread(url_c);
            if status == 1  
                matchString = regexp(keggData,'.*','match','dotexceptnewline');
                for i = 1:length(matchString)
                    if regexp(matchString{i},'ENTRY')
                        try
                            reactionStructure.ENTRY = reaction;
                        catch err
                            disp(err);
                        end
                    elseif regexp(matchString{i},'NAME')
                       try
                            currentString = regexprep(matchString{i},' ','');
                            reactionStructure.NAME = currentString(5: length(currentString));
                       catch err
                           disp(err);
                       end
                    elseif regexp(matchString{i},'DEFINITION')
                       try
                            currentString = regexprep(matchString{i},' ','');
                            reactionStructure.DEFINITION = currentString(11:length(currentString));
                       catch err
                           disp(err);
                       end
                    elseif regexp(matchString{i},'EQUATION')
                       try
                           reactionStructure.EQUATION = matchString{i}(9:length(matchString{i}));
                       catch err
                           disp(err);
                       end
                    elseif regexp(matchString{i},'PATHWAY')
                       try
                           lastElementIndex = i;
                           for j=1:length(matchString)
                                if regexp(matchString{j},'ORTHOLOGY')
                                   lastElementIndex = j;
                                end 
                           end
                           listOfPathways = [];
                           for j=i:lastElementIndex-1
                                pathway = strtrim(strrep(matchString(j),'PATHWAY',''));
                                listOfPathways = [listOfPathways; pathway];
                           end
                           reactionStructure.PATHWAY = listOfPathways;
                       catch err
                           disp(err);
                       end
                     elseif regexp(matchString{i},'RPAIR')
                         try
                           lastElementIndex = i;
                           for j=1:length(matchString)
                                if regexp(matchString{j},'ENZYME')
                                   lastElementIndex = j;
                                end 
                           end
                           listOfRPairs = [];
                           for j = i:lastElementIndex-1
                                rpair = strtrim(strrep(matchString(j),'RPAIR',''));
                                listOfRPairs = [listOfRPairs; rpair];
                           end
                           reactionStructure.RPs = listOfRPairs;
                        catch err
                           disp(err);
                        end
                    end
                end  
                reactions = [reactions,reactionStructure];
                assignin('base', 'reactions', reactions);
            else
                disp(strcat('error:', url_c));
            end
       catch err
            disp(err);
       end
    end
end